@@ -48,30 +48,6 @@ PLAIN_ARGOUT(CameraFile **)
4848// return pointers in output params
4949STRING_ARGOUT ()
5050
51- // gp_file_slurp() returns the number of bytes read
52- %apply unsigned int *OUTPUT { size_t *readlen };
53-
54- // gp_file_slurp() fills a user-supplied buffer
55- %typemap(doc) (char *data, size_t size) " $1_name: writable buffer"
56- %typemap(in, numinputs=1 ) (char *data, size_t size) {
57- Py_buffer view;
58- if (PyObject_CheckBuffer ($input) != 1 ) {
59- PyErr_SetString (
60- PyExc_TypeError,
61- " in method '$symname', argument $argnum does not support the buffer interface" );
62- SWIG_fail;
63- }
64- if (PyObject_GetBuffer ($input, &view, PyBUF_SIMPLE | PyBUF_WRITABLE) != 0 ) {
65- PyErr_SetString (
66- PyExc_TypeError,
67- " in method '$symname', argument $argnum does not export a writable buffer" );
68- SWIG_fail;
69- }
70- $1 = view.buf ;
71- $2 = view.len ;
72- PyBuffer_Release (&view);
73- }
74-
7551// Define a simple Python type that has the buffer interface
7652// This definition is not SWIGGED, just compiled
7753%{
@@ -245,11 +221,11 @@ MEMBER_FUNCTION(_CameraFile, CameraFile,
245221MEMBER_FUNCTION (_CameraFile, CameraFile,
246222 append, (const char *data, unsigned long int size),
247223 gp_file_append, ($self, data, size))
248- MEMBER_FUNCTION (_CameraFile, CameraFile,
249- slurp, (char *data, size_t size, size_t *readlen),
250- gp_file_slurp, ($self, data, size, readlen))
251224
252225// These structures are private
253226%ignore _CameraFileHandler;
254227
228+ // These functions are internal
229+ %ignore gp_file_slurp;
230+
255231%include " gphoto2/gphoto2-file.h"
0 commit comments