当前位置: 首页>>代码示例>>C++>>正文


C++ wrap_int函数代码示例

本文整理汇总了C++中wrap_int函数的典型用法代码示例。如果您正苦于以下问题:C++ wrap_int函数的具体用法?C++ wrap_int怎么用?C++ wrap_int使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了wrap_int函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: xmlSecPtrListPtr_get

PyObject *xmlSecPtrList_getattr(PyObject *self, PyObject *args) {
  PyObject *list_obj;
  xmlSecPtrListPtr list;
  const char *attr;

  if (CheckArgs(args, "OS:ptrListGetAttr")) {
    if (!PyArg_ParseTuple(args, "Os:ptrListGetAttr", &list_obj, &attr))
      return NULL;
  }
  else return NULL;

  list = xmlSecPtrListPtr_get(list_obj);

  if (!strcmp(attr, "__members__"))
    return Py_BuildValue("[sssss]", "id", "data", "use", "max", "allocMode");
  if (!strcmp(attr, "id"))
    return wrap_xmlSecPtrListId(list->id);
  if (!strcmp(attr, "data"))
    return (wrap_xmlSecPtr(list->data));
  if (!strcmp(attr, "use"))
    return (wrap_int(list->use));
  if (!strcmp(attr, "max"))
    return (wrap_int(list->max));
  if (!strcmp(attr, "allocMode"))
    return (wrap_int(list->allocMode));

  Py_INCREF(Py_None);
  return (Py_None);
}
开发者ID:DeltaOS,项目名称:pyxmlsec,代码行数:29,代码来源:list.c

示例2: xmlSecBufferPtr_get

PyObject *xmlSecBuffer_getattr(PyObject *self, PyObject *args) {
  PyObject *buf_obj;
  xmlSecBufferPtr buf;
  const char *attr;

  if (CheckArgs(args, "OS:bufferGetAttr")) {
    if (!PyArg_ParseTuple(args, "Os:bufferGetAttr", &buf_obj, &attr))
      return NULL;
  }
  else return NULL;

  buf = xmlSecBufferPtr_get(buf_obj);

  if (!strcmp(attr, "__members__"))
    return Py_BuildValue("[ssss]", "data", "size", "maxSize", "allocMode");
  if (!strcmp(attr, "data"))
    return (wrap_xmlSecBytePtr(buf->data));
  if (!strcmp(attr, "size"))
    return (wrap_int(buf->size));
  if (!strcmp(attr, "maxSize"))
    return (wrap_int(buf->maxSize));
  if (!strcmp(attr, "allocMode"))
    return (wrap_int(buf->allocMode));

  Py_INCREF(Py_None);
  return (Py_None);
}
开发者ID:DeltaOS,项目名称:pyxmlsec,代码行数:27,代码来源:buffer.c

示例3: xmlSecKeyInfoCtxPtr_get

PyObject *xmlSecKeyInfoCtx_getattr(PyObject *self, PyObject *args) {
  PyObject *keyInfoCtx_obj;
  xmlSecKeyInfoCtxPtr keyInfoCtx;
  const char *attr;

  if (CheckArgs(args, "OS:keyInfoCtxGetAttr")) {
    if (!PyArg_ParseTuple(args, "Os:keyInfoCtxGetAttr", &keyInfoCtx_obj,
			  &attr))
      return NULL;
  }
  else return NULL;

  keyInfoCtx = xmlSecKeyInfoCtxPtr_get(keyInfoCtx_obj);

  if (!strcmp(attr, "__members__"))
    return Py_BuildValue("[ssssssssssssss]", "flags",
			 "flags2", "keysMngr", "mode", "enabledKeyData",
			 "base64LineSize", "retrievalMethodCtx",
			 "maxRetrievalMethodLevel", "encCtx",
			 "maxEncryptedKeyLevel", "certsVerificationTime",
			 "certsVerificationDepth", "curRetrievalMethodLevel",
			 "keyReq");
  if (!strcmp(attr, "flags"))
    return (wrap_int(keyInfoCtx->flags));
  if (!strcmp(attr, "flags2"))
    return (wrap_int(keyInfoCtx->flags2));
  if (!strcmp(attr, "keysMngr"))
    return (wrap_xmlSecKeysMngrPtr(keyInfoCtx->keysMngr));
  if (!strcmp(attr, "mode"))
    return (wrap_int(keyInfoCtx->mode));
  if (!strcmp(attr, "enabledKeyData"))
    return (wrap_xmlSecPtrListPtr(&(keyInfoCtx->enabledKeyData)));
  if (!strcmp(attr, "base64LineSize"))
    return (wrap_int(keyInfoCtx->base64LineSize));
  if (!strcmp(attr, "retrievalMethodCtx"))
    return (wrap_xmlSecTransformCtxPtr(&(keyInfoCtx->retrievalMethodCtx)));
  if (!strcmp(attr, "maxRetrievalMethodLevel"))
    return (wrap_int(keyInfoCtx->maxRetrievalMethodLevel));
  if (!strcmp(attr, "encCtx"))
    return (wrap_xmlSecEncCtxPtr(keyInfoCtx->encCtx));
  if (!strcmp(attr, "maxEncryptedKeyLevel"))
    return (wrap_int(keyInfoCtx->maxEncryptedKeyLevel));
  if (!strcmp(attr, "certsVerificationTime"))
    return (wrap_int(keyInfoCtx->certsVerificationTime));
  if (!strcmp(attr, "certsVerificationDepth"))
    return (wrap_int(keyInfoCtx->certsVerificationDepth));
  if (!strcmp(attr, "curRetrievalMethodLevel"))
    return (wrap_int(keyInfoCtx->curRetrievalMethodLevel));
  if (!strcmp(attr, "curEncryptedKeyLevel"))
    return (wrap_int(keyInfoCtx->curEncryptedKeyLevel));
  if (!strcmp(attr, "keyReq"))
    return wrap_xmlSecKeyReqPtr(&(keyInfoCtx->keyReq));

  Py_INCREF(Py_None);
  return (Py_None);
}
开发者ID:andersinno,项目名称:pyxmlsec,代码行数:56,代码来源:keyinfo.c

示例4: xmlSecNodeSetPtr_get

PyObject *xmlsec_NodeSetWalk(PyObject *self, PyObject *args) {
  PyObject *nset_obj, *walkFunc_obj, *data_obj;
  xmlSecNodeSetPtr nset;
  int ret;

  if (CheckArgs(args, "OC?:nodeSetWalk")) {
    if (!PyArg_ParseTuple(args, "OOO:nodeSetWalk", &nset_obj, &walkFunc_obj,
			  &data_obj))
      return NULL;
  }
  else return NULL;

  nset = xmlSecNodeSetPtr_get(nset_obj);

  if (NodeSetWalkCallbacks == NULL && walkFunc_obj != Py_None)
    NodeSetWalkCallbacks = xmlHashCreate(HASH_TABLE_SIZE);
  if (walkFunc_obj != Py_None)
    xmlHashAddEntry2(NodeSetWalkCallbacks, (const xmlChar *)nset->doc->name,
		     nset->doc->URL, walkFunc_obj);

  Py_XINCREF(walkFunc_obj);
  ret = xmlSecNodeSetWalk(nset, xmlsec_NodeSetWalkCallback,
			  PyCObject_AsVoidPtr(data_obj));

  return (wrap_int(ret));
}
开发者ID:adrianobalani,项目名称:AssinaturaDigitalNFE,代码行数:26,代码来源:nodeset.c

示例5: xmlSecKeyDataId_get

PyObject *xmlsec_KeyDataBinWrite(PyObject *self, PyObject *args) {
  PyObject *id_obj, *key_obj, *keyInfoCtx_obj;
  xmlSecKeyDataId id;
  xmlSecKeyPtr key;
  // FIXME
  //xmlSecByte **buf;
  //xmlSecSize *bufSize;
  xmlSecByte *buf;
  xmlSecSize bufSize;
  xmlSecKeyInfoCtxPtr keyInfoCtx;

  if (CheckArgs(args, "OOSIO:keyDataBinWrite")) {
    if (!PyArg_ParseTuple(args, "OOsiO:keyDataBinWrite",
			  &id_obj, &key_obj, &buf, &bufSize, &keyInfoCtx_obj))
    return NULL;
  }
  else return NULL;

  id = xmlSecKeyDataId_get(id_obj);
  key = xmlSecKeyPtr_get(key_obj);
  keyInfoCtx = xmlSecKeyInfoCtxPtr_get(keyInfoCtx_obj);

  //return (wrap_int(xmlSecKeyDataBinWrite(id, key, buf, bufSize, keyInfoCtx)));
  return (wrap_int(xmlSecKeyDataBinWrite(id, key, &buf, &bufSize, keyInfoCtx)));
}
开发者ID:dnet,项目名称:pyxmlsec,代码行数:25,代码来源:keysdata.c

示例6: xmlSecTransformCtxPtr_get

PyObject *xmlSecTransformCtx_getattr(PyObject *self, PyObject *args) {
  PyObject *transformCtx_obj;
  xmlSecTransformCtxPtr transformCtx;
  const char *attr;

  if (CheckArgs(args, "OS:transformCtxGetAttr")) {
    if (!PyArg_ParseTuple(args, "Os:transformCtxGetAttr",
			  &transformCtx_obj, &attr))
      return NULL;
  }
  else return NULL;

  transformCtx = xmlSecTransformCtxPtr_get(transformCtx_obj);

  if (!strcmp(attr, "__members__"))
    return Py_BuildValue("[sssssssssss]", "flags",
			 "flags2", "enabledUris", "enabledTransforms",
			 "preExecCallback", "result", "status", "uri",
			 "xptrExpr", "first", "last");
  if (!strcmp(attr, "flags"))
    return (wrap_int(transformCtx->flags));
  if (!strcmp(attr, "flags2"))
    return (wrap_int(transformCtx->flags2));
  if (!strcmp(attr, "enabledUris"))
    return (wrap_int(transformCtx->enabledUris));
  if (!strcmp(attr, "enabledTransforms"))
    return (wrap_xmlSecPtrListPtr(&(transformCtx->enabledTransforms)));
  if (!strcmp(attr, "preExecCallback"))
    return PyCObject_FromVoidPtr((void *) transformCtx->preExecCallback, NULL);
  if (!strcmp(attr, "result"))
    return (wrap_xmlSecBufferPtr(transformCtx->result));
  if (!strcmp(attr, "status"))
    return (wrap_int(transformCtx->status));
  if (!strcmp(attr, "uri"))
    return (wrap_xmlCharPtr(transformCtx->uri));
  if (!strcmp(attr, "xptrExpr"))
    return (wrap_xmlCharPtr(transformCtx->xptrExpr));
  if (!strcmp(attr, "first"))
    return (wrap_xmlSecTransformPtr(transformCtx->first));
  if (!strcmp(attr, "last"))
    return (wrap_xmlSecTransformPtr(transformCtx->last));

  Py_INCREF(Py_None);
  return (Py_None);
}
开发者ID:badbole,项目名称:sh,代码行数:45,代码来源:transforms.c

示例7: xmlSecTransformPtr_get

PyObject *xmlSecTransform_getattr(PyObject *self, PyObject *args) {
  PyObject *transform_obj;
  xmlSecTransformPtr transform;
  const char *attr;

  if (CheckArgs(args, "OS:transformGetAttr")) {
    if (!PyArg_ParseTuple(args, "Os:transformGetAttr",
			  &transform_obj, &attr))
      return NULL;
  }
  else return NULL;

  transform = xmlSecTransformPtr_get(transform_obj);

  if (!strcmp(attr, "__members__"))
    return Py_BuildValue("[ssssssssss]", "id", "operation", "status",
			 "hereNode", "next", "prev", "inBuf", "outBuf",
			 "inNodes", "outNodes");
  if (!strcmp(attr, "id"))
    return (wrap_xmlSecTransformId(transform->id));
  if (!strcmp(attr, "operation"))
    return (wrap_int(transform->operation));
  if (!strcmp(attr, "status"))
    return (wrap_int(transform->status));
  if (!strcmp(attr, "hereNode"))
    return (wrap_xmlNodePtr(transform->hereNode));
  if (!strcmp(attr, "next"))
    return (wrap_xmlSecTransformPtr(transform->next));
  if (!strcmp(attr, "prev"))
    return (wrap_xmlSecTransformPtr(transform->prev));
  if (!strcmp(attr, "inBuf"))
    return (wrap_xmlSecBufferPtr(&(transform->inBuf)));
  if (!strcmp(attr, "outBuf"))
    return (wrap_xmlSecBufferPtr(&(transform->outBuf)));
  if (!strcmp(attr, "inNodes"))
    return (wrap_xmlSecNodeSetPtr(transform->inNodes));
  if (!strcmp(attr, "outNodes"))
    return (wrap_xmlSecNodeSetPtr(transform->outNodes));

  Py_INCREF(Py_None);
  return (Py_None);
}
开发者ID:badbole,项目名称:sh,代码行数:42,代码来源:transforms.c

示例8: xmlSecKeyDataPtr_get

PyObject *xmlsec_KeyDataIsValid(PyObject *self, PyObject *args) {
  PyObject *data_obj;
  xmlSecKeyDataPtr data;
  
  if (CheckArgs(args, "O:keyDataIsValid")) {
    if (!PyArg_ParseTuple(args, "O:keyDataIsValid", &data_obj))
      return NULL;
  }
  else return NULL;

  data = xmlSecKeyDataPtr_get(data_obj);

  return (wrap_int(xmlSecKeyDataIsValid(data)));
}
开发者ID:dnet,项目名称:pyxmlsec,代码行数:14,代码来源:keysdata.c

示例9: xmlSecTransformUriTypeCheck

PyObject *xmlsec_TransformUriTypeCheck(PyObject *self, PyObject *args) {
  xmlSecTransformUriType type;
  const xmlChar *uri;
  int ret;

  if (CheckArgs(args, "IS:transformUriTypeCheck")) {
    if(!PyArg_ParseTuple(args, (char *) "is:transformUriTypeCheck", &type, &uri))
      return NULL;
  }
  else return NULL;

  ret = xmlSecTransformUriTypeCheck(type, uri);
  return (wrap_int(ret));
}
开发者ID:badbole,项目名称:sh,代码行数:14,代码来源:transforms.c

示例10: xmlSecEncCtxPtr_get

PyObject *xmlsec_EncCtxCopyUserPref(PyObject *self, PyObject *args) {
  PyObject *dst_obj, *src_obj;
  xmlSecEncCtxPtr dst, src;

  if (CheckArgs(args, "OO:encCtxCopyUserPref")) {
    if (!PyArg_ParseTuple(args, "OO:encCtxCopyUserPref", &dst_obj, &src_obj))
      return NULL;
  }
  else return NULL;

  dst = xmlSecEncCtxPtr_get(dst_obj);
  src = xmlSecEncCtxPtr_get(src_obj);

  return (wrap_int(xmlSecEncCtxCopyUserPref(dst, src)));
}
开发者ID:badbole,项目名称:sh,代码行数:15,代码来源:xmlenc.c

示例11: xmlSecDSigReferenceCtxPtr_get

PyObject *xmlSecDSigReferenceCtx_getattr(PyObject *self, PyObject *args) {
  PyObject *dsigRefCtx_obj;
  xmlSecDSigReferenceCtxPtr dsigRefCtx;
  const char *attr;

  if (CheckArgs(args, "OS:dsigReferenceCtxGetAttr")) {
    if (!PyArg_ParseTuple(args, "Os:dsigReferenceCtxGetAttr",
			  &dsigRefCtx_obj, &attr))
      return NULL;
  }
  else return NULL;

  dsigRefCtx = xmlSecDSigReferenceCtxPtr_get(dsigRefCtx_obj);

  if (!strcmp(attr, "__members__"))
    return Py_BuildValue("[ssssssssss]", "dsigCtx",
			 "origin", "transformCtx", "digestMethod",
			 "result", "status", "preDigestMemBufMethod",
			 "id", "uri", "type");
  if (!strcmp(attr, "dsigCtx"))
    return (wrap_xmlSecDSigCtxPtr(dsigRefCtx->dsigCtx));
  if (!strcmp(attr, "origin")) return (wrap_int(dsigRefCtx->origin));
  if (!strcmp(attr, "transformCtx"))
    return (wrap_xmlSecTransformCtxPtr(&(dsigRefCtx->transformCtx)));
  if (!strcmp(attr, "digestMethod"))
    return (wrap_xmlSecTransformPtr(dsigRefCtx->digestMethod));
  if (!strcmp(attr, "result")) return (wrap_xmlSecBufferPtr(dsigRefCtx->result));
  if (!strcmp(attr, "status")) return (wrap_int((dsigRefCtx->status)));
  if (!strcmp(attr, "preDigestMemBufMethod"))
    return (wrap_xmlSecTransformPtr((dsigRefCtx->preDigestMemBufMethod)));
  if (!strcmp(attr, "id")) return (wrap_xmlCharPtr((dsigRefCtx->id)));
  if (!strcmp(attr, "uri")) return (wrap_xmlCharPtr((dsigRefCtx->uri)));
  if (!strcmp(attr, "type")) return (wrap_xmlCharPtr((dsigRefCtx->type)));
  Py_INCREF(Py_None);
  return (Py_None);
}
开发者ID:DeltaOS,项目名称:pyxmlsec,代码行数:36,代码来源:xmldsig.c

示例12: return

PyObject *xmlsec_CheckVersionExt(PyObject *self, PyObject *args) {
  int major;
  int minor;
  int subminor;
  xmlSecCheckVersionMode mode;
  
  if (CheckArgs(args, "IIII:checkVersionExt")) {
    if(!PyArg_ParseTuple(args, (char *) "iiii:checkVersionExt",
			 &major, &minor, &subminor, &mode))
      return NULL;
  }
  else return NULL;

  return (wrap_int(xmlSecCheckVersionExt(major, minor, subminor, mode)));
}
开发者ID:badbole,项目名称:sh,代码行数:15,代码来源:xmlsec.c

示例13: xmlSecDSigCtxPtr_get

PyObject *xmlsec_DSigCtxVerify(PyObject *self, PyObject *args) {
  PyObject *dsigCtx_obj, *node_obj;
  xmlSecDSigCtxPtr dsigCtx;
  xmlNodePtr node;

  if (CheckArgs(args, "OO:dsigCtxVerify")) {
    if (!PyArg_ParseTuple(args, "OO:dsigCtxVerify", &dsigCtx_obj, &node_obj))
      return NULL;
  }
  else return NULL;

  dsigCtx = xmlSecDSigCtxPtr_get(dsigCtx_obj);
  node = xmlNodePtr_get(node_obj);

  return (wrap_int(xmlSecDSigCtxVerify(dsigCtx, node)));
}
开发者ID:DeltaOS,项目名称:pyxmlsec,代码行数:16,代码来源:xmldsig.c

示例14: xmlSecBase64CtxPtr_get

PyObject *xmlsec_Base64CtxInitialize(PyObject *self, PyObject *args) {
  PyObject *ctx_obj;
  int encode;
  int columns;
  xmlSecBase64CtxPtr ctx;

  if (CheckArgs(args, "OII:base64CtxInitialize")) {
    if (!PyArg_ParseTuple(args, "Oii:base64CtxInitialize",
			  &ctx_obj, &encode, &columns))
      return NULL;
  }
  else return NULL;

  ctx = xmlSecBase64CtxPtr_get(ctx_obj);

  return (wrap_int(xmlSecBase64CtxInitialize(ctx, encode, columns)));
}
开发者ID:dnet,项目名称:pyxmlsec,代码行数:17,代码来源:base64.c

示例15: xmlSecKeysMngrPtr_get

PyObject *xmlsec_KeysMngrAdoptDataStore(PyObject *self, PyObject *args) {
  PyObject *mngr_obj, *store_obj;
  xmlSecKeysMngrPtr mngr;
  xmlSecKeyDataStorePtr store;

  if (CheckArgs(args, "OO:keysMngrAdoptDataStore")) {
    if (!PyArg_ParseTuple(args, "OO:keysMngrAdoptDataStore", &mngr_obj,
			  &store_obj))
      return NULL;
  }
  else return NULL;

  mngr = xmlSecKeysMngrPtr_get(mngr_obj);
  store = xmlSecKeyDataStorePtr_get(store_obj);

  return (wrap_int(xmlSecKeysMngrAdoptDataStore(mngr, store)));
}
开发者ID:dnet,项目名称:pyxmlsec,代码行数:17,代码来源:keysmngr.c


注:本文中的wrap_int函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。