* xmlBufferCreate: * * routine to create an XML buffer. * returns the new structure. */
| 7108 | * returns the new structure. |
| 7109 | */ |
| 7110 | xmlBufferPtr |
| 7111 | xmlBufferCreate(void) { |
| 7112 | xmlBufferPtr ret; |
| 7113 | |
| 7114 | ret = (xmlBufferPtr) xmlMalloc(sizeof(xmlBuffer)); |
| 7115 | if (ret == NULL) |
| 7116 | return(NULL); |
| 7117 | ret->use = 0; |
| 7118 | ret->size = xmlDefaultBufferSize; |
| 7119 | ret->alloc = xmlBufferAllocScheme; |
| 7120 | ret->content = (xmlChar *) xmlMallocAtomic(ret->size); |
| 7121 | if (ret->content == NULL) { |
| 7122 | xmlFree(ret); |
| 7123 | return(NULL); |
| 7124 | } |
| 7125 | ret->content[0] = 0; |
| 7126 | ret->contentIO = NULL; |
| 7127 | return(ret); |
| 7128 | } |
| 7129 | |
| 7130 | /** |
| 7131 | * xmlBufferCreateSize: |
no outgoing calls
no test coverage detected