Changeset 54645


Ignore:
Timestamp:
Jul 4, 2009, 4:18:24 PM (9 years ago)
Author:
Haoyu Bai
Message:

fix the 'try' test case

Location:
sandbox-branches/bhy/py3k/libs/python/test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sandbox-branches/bhy/py3k/libs/python/test/m1.cpp

    r41521 r54645  
    3333
    3434PyTypeObject NoddyType = {
    35     PyObject_HEAD_INIT(NULL)
    36     0,
     35    PyVarObject_HEAD_INIT(NULL, 0)
    3736    const_cast<char*>("Noddy"),
    3837    sizeof(NoddyObject),
     
    105104
    106105PyTypeObject SimpleType = {
    107     PyObject_HEAD_INIT(NULL)
    108     0,
     106    PyVarObject_HEAD_INIT(NULL, 0)
    109107    const_cast<char*>("Simple"),
    110108    sizeof(SimpleObject),
  • sandbox-branches/bhy/py3k/libs/python/test/m2.cpp

    r25863 r54645  
    1313#include <boost/python/return_value_policy.hpp>
    1414#include "simple_type.hpp"
     15
     16#if PY_VERSION_HEX >= 0x03000000
     17# define PyString_FromString PyUnicode_FromString
     18# define PyInt_FromLong PyLong_FromLong
     19#endif
    1520
    1621// Get a simple (by value) from the argument, and return the
     
    5257    return PyInt_FromLong(x);
    5358}
     59
     60#if PY_VERSION_HEX >= 0x03000000
     61# undef PyString_FromString
     62# undef PyInt_FromLong
     63#endif
    5464
    5565// rewrap<T> extracts a T from the argument, then converts the T back
Note: See TracChangeset for help on using the changeset viewer.