~pythonregexp2.7/python/issue2636-01

« back to all changes in this revision

Viewing changes to Mac/Modules/qd/_Qdmodule.c

  • Committer: Jeffrey C. "The TimeHorse" Jacobs
  • Date: 2008-06-09 14:37:21 UTC
  • mfrom: (39022.1.14 Regexp-2.6)
  • Revision ID: darklord@timehorse.com-20080609143721-bj0g1mwta28038da
Merged in changes from the core Regexp branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
#include "Python.h"
5
5
 
6
6
 
 
7
#ifndef __LP64__
7
8
 
8
9
#include "pymactoolbox.h"
9
10
 
6544
6545
        return _res;
6545
6546
 
6546
6547
}
 
6548
#endif /* __LP64__ */
6547
6549
 
6548
6550
static PyMethodDef Qd_methods[] = {
 
6551
#ifndef __LP64__
6549
6552
        {"GetPort", (PyCFunction)Qd_GetPort, 1,
6550
6553
         PyDoc_STR("() -> (GrafPtr port)")},
6551
6554
        {"GrafDevice", (PyCFunction)Qd_GrafDevice, 1,
7080
7083
         PyDoc_STR("Take (string, int, Rect) argument and create BitMap")},
7081
7084
        {"RawBitMap", (PyCFunction)Qd_RawBitMap, 1,
7082
7085
         PyDoc_STR("Take string BitMap and turn into BitMap object")},
 
7086
#endif /* __LP64__ */
7083
7087
        {NULL, NULL, 0}
7084
7088
};
7085
7089
 
7086
7090
 
 
7091
#ifndef __LP64__
7087
7092
 
7088
7093
/* Like BMObj_New, but the original bitmap data structure is copied (and
7089
7094
** released when the object is released)
7101
7106
        return (PyObject *)it;
7102
7107
}
7103
7108
 
 
7109
#endif /* __LP64__ */
7104
7110
 
7105
7111
 
7106
7112
void init_Qd(void)
7107
7113
{
7108
7114
        PyObject *m;
 
7115
#ifndef __LP64__
7109
7116
        PyObject *d;
7110
7117
 
7111
7118
 
7117
7124
                PyMac_INIT_TOOLBOX_OBJECT_NEW(RGBColorPtr, QdRGB_New);
7118
7125
                PyMac_INIT_TOOLBOX_OBJECT_CONVERT(RGBColor, QdRGB_Convert);
7119
7126
 
 
7127
#endif /* __LP64__ */
7120
7128
 
7121
7129
        m = Py_InitModule("_Qd", Qd_methods);
 
7130
#ifndef __LP64__
7122
7131
        d = PyModule_GetDict(m);
7123
7132
        Qd_Error = PyMac_GetOSErrException();
7124
7133
        if (Qd_Error == NULL ||
7138
7147
        /* Backward-compatible name */
7139
7148
        Py_INCREF(&BitMap_Type);
7140
7149
        PyModule_AddObject(m, "BitMapType", (PyObject *)&BitMap_Type);
 
7150
#endif /* __LP64__ */
7141
7151
}
7142
7152
 
7143
7153
/* ========================= End module _Qd ========================= */