You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For context: I am working on wrapping cmark-gfm in Julia to use it to extract the AST of a Markdown document. For that, I am dynamically opening the standard shared library products in Julia (i.e. with dlopen or LoadLibraryExW on Windows).
The node types for extensions (e.g. CMARK_NODE_STRIKETHROUGH) are stored as dynamic global variables (as opposed to compile time constants, as for the standard nodes). So when I try to interpret the cmark AST in Julia (e.g. whether a particular cmark_node is a strikethrough or not), I need to know those values (unless there is some other API for this that I missed).
However, those global variables are not decorated with CMARK_GFM_EXTENSIONS_EXPORT, and so on Windows, as far as I can tell, you can't actually read their value with GetProcAddress. I should say that on Linux and MacOS loading those variables with dlsym is fine, since I think everything is exported by default. I also tried patching cmark-gfm by adding CMARK_GFM_EXTENSIONS_EXPORTs to them and then GetProcAddress seems to work on them in Windows.
So, should all of these node type variables just be decorated with CMARK_GFM_EXTENSIONS_EXPORT? Or, if these variables are hidden from the library user for a reason, is there some API that I have missed or that should be created that could be used to determine if a cmark_node is of particular extension type?
The text was updated successfully, but these errors were encountered:
For context: I am working on wrapping cmark-gfm in Julia to use it to extract the AST of a Markdown document. For that, I am dynamically opening the standard shared library products in Julia (i.e. with
dlopen
orLoadLibraryExW
on Windows).The node types for extensions (e.g.
CMARK_NODE_STRIKETHROUGH
) are stored as dynamic global variables (as opposed to compile time constants, as for the standard nodes). So when I try to interpret the cmark AST in Julia (e.g. whether a particularcmark_node
is a strikethrough or not), I need to know those values (unless there is some other API for this that I missed).However, those global variables are not decorated with
CMARK_GFM_EXTENSIONS_EXPORT
, and so on Windows, as far as I can tell, you can't actually read their value withGetProcAddress
. I should say that on Linux and MacOS loading those variables withdlsym
is fine, since I think everything is exported by default. I also tried patching cmark-gfm by addingCMARK_GFM_EXTENSIONS_EXPORT
s to them and thenGetProcAddress
seems to work on them in Windows.So, should all of these node type variables just be decorated with
CMARK_GFM_EXTENSIONS_EXPORT
? Or, if these variables are hidden from the library user for a reason, is there some API that I have missed or that should be created that could be used to determine if acmark_node
is of particular extension type?The text was updated successfully, but these errors were encountered: