* xmlSchemaDupVal: * @v: the #xmlSchemaValPtr value to duplicate * * Makes a copy of @v. The calling program is responsible for freeing * the returned value. * * returns a pointer to a duplicated #xmlSchemaValPtr or NULL if error. */
| 3793 | * returns a pointer to a duplicated #xmlSchemaValPtr or NULL if error. |
| 3794 | */ |
| 3795 | static xmlSchemaValPtr |
| 3796 | xmlSchemaDupVal (xmlSchemaValPtr v) |
| 3797 | { |
| 3798 | xmlSchemaValPtr ret = xmlSchemaNewValue(v->type); |
| 3799 | if (ret == NULL) |
| 3800 | return NULL; |
| 3801 | |
| 3802 | memcpy(ret, v, sizeof(xmlSchemaVal)); |
| 3803 | ret->next = NULL; |
| 3804 | return ret; |
| 3805 | } |
| 3806 | |
| 3807 | /** |
| 3808 | * xmlSchemaCopyValue: |
no test coverage detected