~pythonregexp2.7/python/issue2636

« back to all changes in this revision

Viewing changes to Mac/Modules/te/_TEmodule.c

  • Committer: Jeffrey C. "The TimeHorse" Jacobs
  • Date: 2008-06-09 14:36:32 UTC
  • mfrom: (39021.1.402 Regexp-2.6)
  • Revision ID: darklord@timehorse.com-20080609143632-wwwkx92u1t5l7yd3
Merged in changes from the latest python source snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
#include "Python.h"
5
5
 
 
6
#ifndef __LP64__
6
7
 
7
8
 
8
9
#include "pymactoolbox.h"
1267
1268
                             TEObj_New, _rv);
1268
1269
        return _res;
1269
1270
}
 
1271
#endif /* __LP64__ */
1270
1272
 
1271
1273
static PyMethodDef TE_methods[] = {
 
1274
#ifndef __LP64__
1272
1275
        {"TEScrapHandle", (PyCFunction)TE_TEScrapHandle, 1,
1273
1276
         PyDoc_STR("() -> (Handle _rv)")},
1274
1277
        {"TEGetScrapLength", (PyCFunction)TE_TEGetScrapLength, 1,
1295
1298
         PyDoc_STR("(UInt8 value) -> None")},
1296
1299
        {"as_TE", (PyCFunction)TE_as_TE, 1,
1297
1300
         PyDoc_STR("(Handle h) -> (TEHandle _rv)")},
 
1301
#endif /* __LP64__ */
1298
1302
        {NULL, NULL, 0}
1299
1303
};
1300
1304
 
1304
1308
void init_TE(void)
1305
1309
{
1306
1310
        PyObject *m;
 
1311
#ifndef __LP64__
1307
1312
        PyObject *d;
1308
1313
 
1309
1314
 
1311
1316
                PyMac_INIT_TOOLBOX_OBJECT_NEW(TEHandle, TEObj_New);
1312
1317
                PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TEHandle, TEObj_Convert);
1313
1318
 
 
1319
#endif /* __LP64__ */
1314
1320
 
1315
1321
        m = Py_InitModule("_TE", TE_methods);
 
1322
#ifndef __LP64__
1316
1323
        d = PyModule_GetDict(m);
1317
1324
        TE_Error = PyMac_GetOSErrException();
1318
1325
        if (TE_Error == NULL ||
1325
1332
        /* Backward-compatible name */
1326
1333
        Py_INCREF(&TE_Type);
1327
1334
        PyModule_AddObject(m, "TEType", (PyObject *)&TE_Type);
 
1335
#endif /* __LP64__ */
1328
1336
}
1329
1337
 
1330
1338
/* ========================= End module _TE ========================= */