forked from rebolsource/r3
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove dependence on REB_XXX and VAL_TYPE()
The REB_XXX constants are internal to the system, and their values may be shuffled around for convenience to the implementation. One way to abstract the values is just to create a parallel list of integers that promises not to change and map them through the API. This is the approach taken by the R3-Alpha "RL_API" and Red. However, Ren-C's libRebol takes a different approach by trying to make it easier to make decisions based on types from within a variadic piece of Rebol code, and extract the final answer--avoiding the need for such integers at all. This takes yet another step toward separating the ODBC extension from intimate knowledge of the cell format, by doing a complete mapping to a SQL type inside a call to `rebUnboxInteger()`. This means the code is now fully independent from VAL_TYPE() and REB_XXX constants. Also converts some code that was dissecting BINARY! cells directly to use the rebBytes() API.
- Loading branch information
1 parent
e0786d0
commit 333f570
Showing
2 changed files
with
131 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters