Changeset 751 for trunk/server/source3/librpc/gen_ndr/py_samr.c
- Timestamp:
- Nov 29, 2012, 1:59:04 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/server/source3/librpc/gen_ndr/py_samr.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/source3/librpc/gen_ndr/py_samr.c
r745 r751 6728 6728 struct userPwdChangeFailureInformation *object = (struct userPwdChangeFailureInformation *)py_talloc_get_ptr(obj); 6729 6729 PyObject *py_filterModuleName; 6730 if (object->filterModuleName == NULL) { 6731 py_filterModuleName = Py_None; 6732 Py_INCREF(py_filterModuleName); 6733 } else { 6734 if (object->filterModuleName == NULL) { 6735 py_filterModuleName = Py_None; 6736 Py_INCREF(py_filterModuleName); 6737 } else { 6738 py_filterModuleName = PyUnicode_Decode(object->filterModuleName, strlen(object->filterModuleName), "utf-8", "ignore"); 6739 } 6740 } 6730 py_filterModuleName = py_talloc_reference_ex(lsa_String_Type, py_talloc_get_mem_ctx(obj), &object->filterModuleName); 6741 6731 return py_filterModuleName; 6742 6732 } … … 6745 6735 { 6746 6736 struct userPwdChangeFailureInformation *object = (struct userPwdChangeFailureInformation *)py_talloc_get_ptr(py_obj); 6747 if (value == Py_None) { 6748 object->filterModuleName = NULL; 6749 } else { 6750 object->filterModuleName = NULL; 6751 if (PyUnicode_Check(value)) { 6752 object->filterModuleName = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore")); 6753 } else if (PyString_Check(value)) { 6754 object->filterModuleName = PyString_AS_STRING(value); 6755 } else { 6756 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name); 6757 return -1; 6758 } 6759 } 6737 PY_CHECK_TYPE(lsa_String_Type, value, return -1;); 6738 if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) { 6739 PyErr_NoMemory(); 6740 return -1; 6741 } 6742 object->filterModuleName = *(struct lsa_String *)py_talloc_get_ptr(value); 6760 6743 return 0; 6761 6744 }
Note:
See TracChangeset
for help on using the changeset viewer.
