Skip to content

Conversation

@lundmark
Copy link
Collaborator

The dl_util functions were changed to use the internal allocator. The should not be using the internal allocator since that one is dedicated to be used to the type library. Unfortunately there are conditions as to when the allocations are actually done, so we can't use one temp for the file allocations and one for the instance allocations, since they are sometimes the same. This is to solve issue #90.

The dl_util functions were changed to use the internal allocator. The should not be using the internal allocator since that one is dedicated to be used to the type library. Unfortunately there are conditions as to when the allocations are actually done, so we can't use one temp for the file allocations and one for the instance allocations, since they are sometimes the same. This is to solve issue #90.
Copy link
Owner

@wc-duck wc-duck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the above comments are fixed I'll merge this right away.

filetype - Type of file to read, see dl_util_file_type_t.
out_instance - Pointer to fill with read instance.
out_type - TypeID of instance found in file, can be set to 0x0.
allocator - Allocator for doing temp file allocations
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... and allocating the out-instance!

const char* filename, dl_util_file_type_t filetype,
void** out_instance, dl_typeid_t* out_type );
void** out_instance, dl_typeid_t* out_type,
dl_allocator *allocator = 0x0 );
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to keep default-values out of the interface as this breaks c-compat.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also need doc that says that 0 is valid an what that means.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ait! I will remove default-value and say that 0 is valid!

@wc-duck wc-duck merged commit 5b81f22 into wc-duck:master Aug 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants