~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/_static_tuple_c.c

  • Committer: John Arbash Meinel
  • Date: 2009-10-12 21:44:27 UTC
  • mto: This revision was merged to the branch mainline in revision 4737.
  • Revision ID: john@arbash-meinel.com-20091012214427-zddi1kmc2jlf7v31
Py_ssize_t and its associated function typedefs are not available w/ python 2.4

So we define them in python-compat.h
Even further, gcc issued a warning for:
static int
_workaround_pyrex_096()
So we changed it to:
_workaround_pyrex_096(void)

Also, some python api funcs were incorrectly defined as 'char *' when they meant
'const char *'. Work around that with a (char *) cast, to avoid compiler warnings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 */
21
21
#define STATIC_TUPLE_MODULE
22
22
 
 
23
#include <Python.h>
 
24
#include "python-compat.h"
 
25
 
23
26
#include "_static_tuple_c.h"
24
27
#include "_export_c_api.h"
25
28
 
31
34
#define import__simple_set_pyx import_bzrlib___simple_set_pyx
32
35
#include "_simple_set_pyx_api.h"
33
36
 
34
 
#include "python-compat.h"
35
 
 
36
37
#if defined(__GNUC__)
37
38
#   define inline __inline__
38
39
#elif defined(_MSC_VER)
689
690
 
690
691
 
691
692
static int
692
 
_workaround_pyrex_096()
 
693
_workaround_pyrex_096(void)
693
694
{
694
695
    /* Work around an incompatibility in how pyrex 0.9.6 exports a module,
695
696
     * versus how pyrex 0.9.8 and cython 0.11 export it.