Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Modules/_sqlite/sqlitecompat.h

    r2 r391  
    11/* sqlitecompat.h - compatibility macros
    22 *
    3  * Copyright (C) 2006 Gerhard Häring <gh@ghaering.de>
     3 * Copyright (C) 2006-2010 Gerhard Häring <gh@ghaering.de>
    44 *
    55 * This file is part of pysqlite.
     
    2222 */
    2323
     24#include "Python.h"
     25
    2426#ifndef PYSQLITE_COMPAT_H
    2527#define PYSQLITE_COMPAT_H
     
    3234#endif
    3335
     36
     37/* define PyDict_CheckExact for pre-2.4 versions of Python */
     38#ifndef PyDict_CheckExact
     39#define PyDict_CheckExact(op) ((op)->ob_type == &PyDict_Type)
    3440#endif
     41
     42/* define Py_CLEAR for pre-2.4 versions of Python */
     43#ifndef Py_CLEAR
     44#define Py_CLEAR(op)                            \
     45        do {                                    \
     46                if (op) {                       \
     47                        PyObject *tmp = (PyObject *)(op);       \
     48                        (op) = NULL;            \
     49                        Py_DECREF(tmp);         \
     50                }                               \
     51        } while (0)
     52#endif
     53
     54#ifndef PyVarObject_HEAD_INIT
     55#define PyVarObject_HEAD_INIT(type, size) \
     56    PyObject_HEAD_INIT(type) size,
     57#endif
     58
     59#ifndef Py_TYPE
     60#define Py_TYPE(ob) ((ob)->ob_type)
     61#endif
     62
     63#endif
Note: See TracChangeset for help on using the changeset viewer.