Skip to content

Commit a81d1b0

Browse files
committed
all: introduce go-python.{h,c}
1 parent db7434b commit a81d1b0

16 files changed

+610
-180
lines changed

capi.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package python
22

3-
/*
4-
#include "Python.h"
5-
*/
3+
// #include "go-python.h"
64
import "C"
75

86
// PyObject* Py_BuildValue(const char *format, ...)

cgoflags.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package python
22

33
// #cgo pkg-config: python-2.7
4-
// #include "Python.h"
4+
// #include "go-python.h"
55
import "C"
66

77
// EOF

dict.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
package python
22

3-
//#include "Python.h"
4-
//#include <stdlib.h>
5-
//#include <string.h>
6-
//int _gopy_PyDict_Check(PyObject *o) { return PyDict_Check(o); }
7-
//int _gopy_PyDict_CheckExact(PyObject *o) { return PyDict_CheckExact(o); }
3+
//#include "go-python.h"
84
import "C"
95

106
import (

exceptions.go

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,6 @@
11
package python
22

3-
/*
4-
#include "Python.h"
5-
#include <stdlib.h>
6-
#include <string.h>
7-
8-
// FIXME we should instead have a exceptions_windows.go file...
9-
# ifndef WIN32
10-
PyObject* PyErr_SetFromWindowsErr(int ierr) { return NULL; }
11-
PyObject* PyErr_SetExcFromWindowsErr(PyObject *type, int ierr) { return NULL; }
12-
PyObject* PyErr_SetFromWindowsErrWithFilename(int ierr, const char *filename) { return NULL; }
13-
PyObject* PyErr_SetExcFromWindowsErrWithFilename(PyObject *type, int ierr, char *filename) { return NULL; }
14-
15-
# endif
16-
17-
int _gopy_PyErr_WarnPy3k(char *message, int stacklevel)
18-
{ return PyErr_WarnPy3k(message, stacklevel);}
19-
20-
*/
3+
// #include "go-python.h"
214
import "C"
225

236
import (

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy