Message153709
| Author |
pitrou |
| Recipients |
James.Sanders, alexandre.vassalotti, hynek, pitrou |
| Date |
2012年02月19日.16:18:17 |
| SpamBayes Score |
1.3345459e-06 |
| Marked as misclassified |
No |
| Message-id |
<1329668298.2.0.721526705886.issue13842@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> I'm completely new to the C API so not sure if the way I am building
> python strings (to pass to save_global) is correct
It's correct but it's probably less efficient than calling a more specialized function, such as PyUnicode_FromString():
http://docs.python.org/dev/c-api/unicode.html#PyUnicode_FromString
You also have to check the return value (for non-NULL, NULL meaning an error occurred) before calling save_global with it. |
|