mirror of
https://github.com/cemu-project/idapython.git
synced 2024-12-26 01:31:54 +01:00
Fixed netnode::getblob()
This commit is contained in:
parent
9b6a6eda86
commit
791fde6af7
@ -43,6 +43,9 @@
|
||||
#include "xref.hpp"
|
||||
%}
|
||||
|
||||
// Do not create separate wrappers for default arguments
|
||||
%feature("compactdefaultargs");
|
||||
|
||||
#ifdef __EA64__
|
||||
%constant ea_t BADADDR = 0xFFFFFFFFFFFFFFFF;
|
||||
%constant sel_t BADSEL = 0xFFFFFFFFFFFFFFFF;
|
||||
@ -78,6 +81,7 @@ typedef long long longlong;
|
||||
// Convert all of these
|
||||
%cstring_output_maxstr_none(char *buf, size_t bufsize);
|
||||
%binary_output_or_none(void *buf, size_t bufsize);
|
||||
%binary_output_with_size(void *buf, size_t *bufsize);
|
||||
|
||||
// Accept single Python string for const void * + size input arguments
|
||||
// For example: put_many_bytes() and patch_many_bytes()
|
||||
@ -97,9 +101,6 @@ typedef long long longlong;
|
||||
%pointer_class(sval_t, sval_pointer);
|
||||
%pointer_class(sel_t, sel_pointer);
|
||||
|
||||
// Do not create separate wrappers for default arguments
|
||||
%feature("compactdefaultargs");
|
||||
|
||||
%include "ida.i"
|
||||
%include "idd.i"
|
||||
%include "idp.i"
|
||||
|
@ -112,6 +112,39 @@
|
||||
}
|
||||
%enddef
|
||||
|
||||
%define %binary_output_with_size(TYPEMAP, SIZE)
|
||||
%typemap (default) SIZE {
|
||||
size_t ressize = MAXSPECSIZE;
|
||||
$1 = &ressize;
|
||||
}
|
||||
%typemap(in,numinputs=0) (TYPEMAP, SIZE) {
|
||||
#ifdef __cplusplus
|
||||
$1 = (char *) new char[MAXSPECSIZE+1];
|
||||
#else
|
||||
$1 = (char *) malloc(MAXSPECSIZE+1);
|
||||
#endif
|
||||
}
|
||||
%typemap(out) ssize_t {
|
||||
/* REMOVING ssize_t return value in $symname */
|
||||
}
|
||||
%typemap(argout) (TYPEMAP,SIZE) {
|
||||
if (result)
|
||||
{
|
||||
resultobj = PyString_FromStringAndSize((char *)$1, *$2);
|
||||
}
|
||||
else
|
||||
{
|
||||
Py_INCREF(Py_None);
|
||||
resultobj = Py_None;
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
delete [] (char *)$1;
|
||||
#else
|
||||
free((char *)$1);
|
||||
#endif
|
||||
}
|
||||
%enddef
|
||||
|
||||
// Check that the argument is a callable Python object
|
||||
%typemap(in) PyObject *pyfunc {
|
||||
if (!PyCallable_Check($input)) {
|
||||
|
Loading…
Reference in New Issue
Block a user