Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cc34faa

Browse files
committed
Add prototypes for PyOS_strto[u]l -- Chris Herborth.
1 parent 9df827f commit cc34faa

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Include/intobject.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,15 @@ extern DL_IMPORT(PyIntObject) _Py_ZeroStruct, _Py_TrueStruct; /* Don't use these
8585
/* Macro, trading safety for speed */
8686
#define PyInt_AS_LONG(op) (((PyIntObject *)(op))->ob_ival)
8787

88+
/* These aren't really part of the Int object, but they're handy; the protos
89+
* are necessary for systems that need the magic of DL_IMPORT and that want
90+
* to have stropmodule as a dynamically loaded module instead of building it
91+
* into the main Python shared library/DLL. Guido thinks I'm weird for
92+
* building it this way. :-) [cjh]
93+
*/
94+
extern DL_IMPORT(unsigned long) PyOS_strtoul Py_PROTO((char *, char **, int));
95+
extern DL_IMPORT(long) PyOS_strtol Py_PROTO((char *, char **, int));
96+
8897
#ifdef __cplusplus
8998
}
9099
#endif

0 commit comments

Comments
 (0)