static encodePtr make_persistent_sdl_encoder(encodePtr enc, HashTable *ptr_map, HashTable *bp_types, HashTable *bp_encoders)
{
	encodePtr penc = NULL;

	penc = malloc(sizeof(encode));
	memset(penc, 0, sizeof(encode));

	*penc = *enc;

	if (penc->details.type_str) {
		penc->details.type_str = strdup(penc->details.type_str);
	}
	if (penc->details.ns) {
		penc->details.ns = strdup(penc->details.ns);
	}

	if (penc->details.sdl_type) {
		make_persistent_sdl_type_ref(&penc->details.sdl_type, ptr_map, bp_types);
	}

	return penc;
}
static encodePtr make_persistent_sdl_encoder(encodePtr enc, HashTable *ptr_map, HashTable *bp_types, HashTable *bp_encoders)
{
	encodePtr penc = NULL;

	penc = malloc(sizeof(encode));
	memset(penc, 0, sizeof(encode));

	*penc = *enc;

	if (penc->details.type_str) {
		penc->details.type_str = strdup(penc->details.type_str);
	}
	if (penc->details.ns) {
		penc->details.ns = strdup(penc->details.ns);
	}

	if (penc->details.sdl_type) {
		make_persistent_sdl_type_ref(&penc->details.sdl_type, ptr_map, bp_types);
	}

	return penc;
}