Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Apr 19, 2024. It is now read-only.

Latest commit

 

History

History
History
43 lines (34 loc) · 1.26 KB

File metadata and controls

43 lines (34 loc) · 1.26 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright (c) 2017 Ryan Leckey
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
#include "common.h"
#include "lxml.h"
#include <etree_defs.h>
#include <lxml.etree_api.h>
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>
#include <libxml/dict.h>
int PyXmlSec_InitLxmlModule(void) {
return import_lxml__etree();
}
int PyXmlSec_IsElement(xmlNodePtr xnode) {
return _isElement(xnode);
}
PyXmlSec_LxmlElementPtr PyXmlSec_elementFactory(PyXmlSec_LxmlDocumentPtr doc, xmlNodePtr xnode) {
return elementFactory(doc, xnode);
}
int PyXmlSec_LxmlElementConverter(PyObject* o, PyXmlSec_LxmlElementPtr* p) {
PyXmlSec_LxmlElementPtr node = rootNodeOrRaise(o);
if (node == NULL) {
return 0;
}
*p = node;
// rootNodeOrRaise - increments ref-count, so need to compensate this.
Py_DECREF(node);
return 1;
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.