From 487bfdfc0603ab7bf5fad381f52b8932cbcd355e Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Mon, 8 Aug 2011 16:33:48 -0700 Subject: Begin port of Python extension to new APIs. --- lang_ext/python/cext.h | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 lang_ext/python/cext.h (limited to 'lang_ext/python/cext.h') diff --git a/lang_ext/python/cext.h b/lang_ext/python/cext.h deleted file mode 100644 index f53e6e7..0000000 --- a/lang_ext/python/cext.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * upb - a minimalist implementation of protocol buffers. - * - * Copyright (c) 2009 Joshua Haberman. See LICENSE for details. - * Author: Josh Haberman - */ - -#ifndef UPB_PYTHON_CEXT_H_ -#define UPB_PYTHON_CEXT_H_ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct { - PyObject_HEAD - struct upb_context *context; - PyObject *created_defs; -} PyUpb_Context; - -typedef struct { - PyObject_HEAD - struct upb_msgdef *def; - PyUpb_Context *context; -} PyUpb_MsgDef; - -extern PyTypeObject PyUpb_MsgDefType; - -/* What format string should be passed to PyArg_ParseTuple to get just a raw - * string of bytes and a length. */ -#if PY_MAJOR_VERSION >= 3 -#define BYTES_FORMAT "y#" -#else -#define BYTES_FORMAT "s#" -#endif - -#define RETURN_BOOL(val) if(val) { Py_RETURN_TRUE; } else { Py_RETURN_FALSE; } - -extern PyMODINIT_FUNC initdefinition(void); -extern PyMODINIT_FUNC initpb(void); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif -- cgit v1.2.3