Ignore:
Timestamp:
Nov 14, 2012, 12:59:34 PM (12 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to 3.6.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified vendor/current/source4/librpc/rpc/pyrpc.h

    r414 r740  
    2222
    2323#include "libcli/util/pyerrors.h"
    24 #include "librpc/rpc/dcerpc.h"
     24
     25#ifndef Py_TYPE /* Py_TYPE is only available on Python > 2.6 */
     26#define Py_TYPE(ob)             (((PyObject*)(ob))->ob_type)
     27#endif
    2528
    2629#define PY_CHECK_TYPE(type, var, fail) \
    2730        if (!PyObject_TypeCheck(var, type)) {\
    28                 PyErr_Format(PyExc_TypeError, "Expected type %s", (type)->tp_name); \
     31                PyErr_Format(PyExc_TypeError, __location__ ": Expected type '%s' for '%s' of type '%s'", (type)->tp_name, #var, Py_TYPE(var)->tp_name); \
    2932                fail; \
    3033        }
     
    3740#define dom_sid28_Check dom_sid_Check
    3841
    39 /* This macro is only provided by Python >= 2.3 */
    40 #ifndef PyAPI_DATA
    41 #   define PyAPI_DATA(RTYPE) extern RTYPE
    42 #endif
    43 
    4442typedef struct {
    4543        PyObject_HEAD
     44        TALLOC_CTX *mem_ctx;
    4645        struct dcerpc_pipe *pipe;
     46        struct dcerpc_binding_handle *binding_handle;
    4747} dcerpc_InterfaceObject;
    4848
    49 PyAPI_DATA(PyTypeObject) dcerpc_InterfaceType;
    5049
    51 #define PyErr_FromNdrError(err) Py_BuildValue("(is)", err, ndr_map_error2string(err))
    52 
    53 #define PyErr_SetNdrError(err) \
    54                 PyErr_SetObject(PyExc_RuntimeError, PyErr_FromNdrError(err))
    55 
    56 void PyErr_SetDCERPCStatus(struct dcerpc_pipe *pipe, NTSTATUS status);
    57 
    58 typedef bool (*py_data_pack_fn) (PyObject *args, PyObject *kwargs, void *r);
    59 typedef PyObject *(*py_data_unpack_fn) (void *r);
    60 
    61 struct PyNdrRpcMethodDef {
    62         const char *name;
    63         const char *doc;
    64         dcerpc_call_fn call;
    65         py_data_pack_fn pack_in_data;
    66         py_data_unpack_fn unpack_out_data;
    67         uint32_t opnum;
    68         const struct ndr_interface_table *table;
    69 };
    70 
    71 bool PyInterface_AddNdrRpcMethods(PyTypeObject *object, const struct PyNdrRpcMethodDef *mds);
    72 PyObject *py_dcerpc_interface_init_helper(PyTypeObject *type, PyObject *args, PyObject *kwargs, const struct ndr_interface_table *table);
     50/*
     51  these prototypes should be generated by the python pidl backend, but
     52  aren't yet. They are needed when one module that has python access
     53  is accessed by another module
     54 */
     55union netr_LogonLevel *py_export_netr_LogonLevel(TALLOC_CTX *mem_ctx, int level, PyObject *in);
     56union netr_Validation;
     57PyObject *py_import_netr_Validation(TALLOC_CTX *mem_ctx, int level, union netr_Validation *in);
    7358
    7459#endif /* _PYRPC_H_ */
Note: See TracChangeset for help on using the changeset viewer.