~pythonregexp2.7/python/issue2636-01

« back to all changes in this revision

Viewing changes to Mac/Modules/snd/_Sndmodule.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:
3
3
 
4
4
#include "Python.h"
5
5
 
 
6
#ifndef __LP64__
6
7
 
7
8
 
8
9
#include "pymactoolbox.h"
981
982
                             byteCount);
982
983
        return _res;
983
984
}
 
985
#endif /* __LP64__ */
984
986
 
985
987
static PyMethodDef Snd_methods[] = {
 
988
#ifndef __LP64__
986
989
        {"SPB", (PyCFunction)Snd_SPB, 1,
987
990
         PyDoc_STR(NULL)},
988
991
        {"SysBeep", (PyCFunction)Snd_SysBeep, 1,
1047
1050
         PyDoc_STR("(long inRefNum) -> (long milliseconds)")},
1048
1051
        {"SPBBytesToMilliseconds", (PyCFunction)Snd_SPBBytesToMilliseconds, 1,
1049
1052
         PyDoc_STR("(long inRefNum) -> (long byteCount)")},
 
1053
#endif /* __LP64__ */
1050
1054
        {NULL, NULL, 0}
1051
1055
};
1052
1056
 
1053
1057
 
 
1058
#ifndef __LP64__
1054
1059
 
1055
1060
/* Routine passed to Py_AddPendingCall -- call the Python callback */
1056
1061
static int
1113
1118
                SetA5(A5);
1114
1119
        }
1115
1120
}
 
1121
#endif /* __LP64__ */
1116
1122
 
1117
1123
 
1118
1124
 
1119
1125
void init_Snd(void)
1120
1126
{
1121
1127
        PyObject *m;
 
1128
#ifndef __LP64__
1122
1129
        PyObject *d;
 
1130
#endif /* __LP64__ */
1123
1131
 
1124
1132
 
1125
1133
 
1126
1134
 
1127
1135
 
1128
1136
        m = Py_InitModule("_Snd", Snd_methods);
 
1137
#ifndef __LP64__
1129
1138
        d = PyModule_GetDict(m);
1130
1139
        Snd_Error = PyMac_GetOSErrException();
1131
1140
        if (Snd_Error == NULL ||
1145
1154
        /* Backward-compatible name */
1146
1155
        Py_INCREF(&SPB_Type);
1147
1156
        PyModule_AddObject(m, "SPBType", (PyObject *)&SPB_Type);
 
1157
#endif /* __LP64__ */
1148
1158
}
1149
1159
 
1150
1160
/* ======================== End module _Snd ========================= */