mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
r5094: Use builtin swig types for converting between fixed width integer types.
This commit is contained in:
parent
9493c47b18
commit
f2a1b237bc
@ -24,17 +24,14 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
%typemap(in) uint32 {
|
||||
if (!PyInt_Check($input) && !PyLong_Check($input)) {
|
||||
PyErr_SetString(PyExc_TypeError, "integer expected");
|
||||
return NULL;
|
||||
}
|
||||
$1 = (uint32_t)PyLong_AsLong($input);
|
||||
}
|
||||
|
||||
%typemap(out) uint32 {
|
||||
$result = PyLong_FromLong($1);
|
||||
}
|
||||
%apply unsigned char { uint8_t };
|
||||
%apply char { int8_t };
|
||||
%apply unsigned int { uint16_t };
|
||||
%apply int { int16_t };
|
||||
%apply unsigned long { uint32_t };
|
||||
%apply long { int32_t };
|
||||
%apply unsigned long long { uint64_t };
|
||||
%apply long long { int64_t };
|
||||
|
||||
%typemap(out) NTSTATUS {
|
||||
$result = PyLong_FromLong(NT_STATUS_V($1));
|
||||
|
Loading…
Reference in New Issue
Block a user