summaryrefslogtreecommitdiff
path: root/lib/erl_interface/src/encode
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright yearRickard Green2021-12-161-1/+1
|
* Merge branch 'maint'Rickard Green2021-12-151-1/+1
|\ | | | | | | | | * maint: Update copyright year
| * Update copyright yearRickard Green2021-12-151-1/+1
| |
* | Fix typos in lib/erl_interfaceKian-Meng, Ang2021-12-141-1/+1
|/
* Support of 64-bit portsRickard Green2020-12-161-7/+21
|
* erl_interface: Accept 64 bit external pidsSverker Eriksson2020-08-121-2/+2
|
* Fix error checking in various ei functionsRickard Green2020-04-271-6/+12
|
* Merge branch 'maint'Rickard Green2020-03-135-5/+5
|\ | | | | | | | | * maint: Update copyright year
| * Update copyright yearRickard Green2020-03-135-5/+5
| |
* | erl_interface: Remove old encoding of pid,port,refsSverker Eriksson2019-05-143-23/+9
|/ | | | | | with tiny creation. This reverts revert-commit ef44ba53defa0002ca6b12a786bd2d3555b0bb7b.
* erl_interface: Tweak bit string encode/decode APISverker Eriksson2019-04-261-9/+92
| | | | | to support zero copy decoding and bit offset arguments for future unaligned bit strings.
* erl_interface: Fix C++ compile errorSverker Eriksson2019-04-231-1/+1
| | | | | | | | | | | | | "export" is a reserved C++ keyword. lib/erl_interface/include/ei.h:290:9: error: expected ‘;’ after struct definition } export; ^ lib/erl_interface/include/ei.h:290:11: error: expected unqualified-id before ‘export’ } export; ^
* erl_interface: Add bitstring and export fun supportSverker Eriksson2019-04-172-49/+89
|
* Revert "erl_interface: Remove old encoding of pid,port,refs"Sverker Eriksson2019-04-093-9/+23
| | | | This reverts commit 78ea501bcc84bd8bd49da97e514c1c3b20682d86.
* erl_interface: Remove old encoding of pid,port,refsSverker Eriksson2019-03-223-23/+9
| | | | with tiny creation.
* Update copyright yearRaimo Niskanen2017-05-042-2/+2
|
* erl_interface: Do not generate atoms on old latin1 ext formatSverker Eriksson2017-03-082-61/+11
| | | | | Solved by letting ei_encode_atom_as ignore 'to_enc' argument and always encode in UTF8 format.
* Merge branch 'henrik/update-copyrightyear'Henrik Nord2016-04-1321-21/+21
|\ | | | | | | | | * henrik/update-copyrightyear: update copyright-year
| * update copyright-yearHenrik Nord2016-03-1521-21/+21
| |
* | erl_interface: Support 32-bit creation for pid,port,refsSverker Eriksson2016-04-073-11/+24
|/
* Change license text to APLv2Bruce Yinhe2015-06-1821-209/+230
|
* erl_interface: Move math.h include after eidef.hBjörn-Egil Dahlberg2015-06-021-3/+3
|
* Do not accept Nan and Infinity valuesDavid N. Welton2015-03-191-0/+12
| | | | | | Erlang does not accept these values, so we return an error in the C interface rather than letting them through to the Erlang VM, which rejects the message with a somewhat cryptic "bad external term".
* erl_interface: Add ei encode/decode for mapsSverker Eriksson2014-03-061-1/+18
|
* Silence two warnings about tests being always trueAnthony Ramine2013-12-021-1/+1
| | | | | | | | | | encode/encode_ulonglong.c:55:25: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare] if ((p < 256) && (p >= 0)) { ~ ^ ~ legacy/erl_marshal.c:293:24: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare] if ((ul < 256) && (ul >= 0)) { ~~ ^ ~
* erl_interface,ic: Remove node_org_enc from erlang_{pid,port,ref}Sverker Eriksson2013-02-184-6/+25
| | | | | | | | | | | in order to be backward compatible with user code that accesses the members of erlang_pid and friend. The documentation does not mention the content of these structs, but we have example code that does. So the safe way it the revert the node_org_enc field (added in R16A) and instead determine in runtime which atom encoding to use depending on if the node atom contains unicode (>255) characters or not.
* erl_interface: Change enum erlang_char_encoding to a typedefSverker Eriksson2013-02-071-5/+5
| | | | to make the API independent of the actual type of erlang_char_encoding
* Merge branch 'lukas/erl_interface/test_atom_as_functions/OTP-10753'Lukas Larsson2013-01-281-16/+17
|\ | | | | | | | | | | | | * lukas/erl_interface/test_atom_as_functions/OTP-10753: Return if size test fails Add utf8 atom encode and decode testcases Validate UTF8/ASCII when buf is NULL
| * Validate UTF8/ASCII when buf is NULLLukas Larsson2013-01-251-16/+17
| |
* | Update copyright yearsBjörn-Egil Dahlberg2013-01-255-5/+5
|/
* erl_interface: Changed erlang_char_encoding interfaceSverker Eriksson2013-01-231-2/+1
| | | | to allow bitwise-or'd combinations.
* erl_interface: even more utf8 atom stuffSverker Eriksson2013-01-221-2/+57
|
* erl_interface: utf8 atoms continuedSverker Eriksson2013-01-185-55/+120
|
* Update copyright yearsBjörn-Egil Dahlberg2011-09-292-2/+2
|
* ei: integer overflow in string/atom encodingMichael Santos2011-06-072-2/+10
| | | | | | | | ei_encode_atom() and ei_encode_string() use strlen() to get the length of the buffer. As strlen() returns an unsigned long long and both ei functions take a signed integer, the length fields may overflow. Check the results of strlen can be held in a signed integer.
* Merge branch 'sv/serge-new_float_ext' into devErlang/OTP2010-06-081-10/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sv/serge-new_float_ext: Let ei_get_type() return ERL_FLOAT_EXT instead of NEW_FLOAT_EXT Fix ei_tmo to restrict dflags to NEW_FLOAT_EXT compact IEEE 754 double encoding in external binary format for ei fix typo in ei_decode_ei_term documentation OTP-8684 sv/serge-new_float_ext compact IEEE 754 double encoding in external binary format for ei Implement the compact IEEE 754 double encoding in external binary format for ei. Encoding for ei now always produces the NEW_FLOAT_EXT format. Decoding and term printing handle both the old ERL_FLOAT_EXT encoding and the new NEW_FLOAT_EXT encoding. Legacy erl_interface code also handles the new encoding, but still produces the ERL_FLOAT_EXT encoding by default. Also enable the DFLAG_NEW_FLOATS distribution flag. ei_get_type() will return ERL_FLOAT_EXT regardless if the external format is encoded with ERL_FLOAT_EXT or NEW_FLOAT_EXT for doubles. Reduce the number of copies of the code for encoding and decoding doubles throughout ei and erl_interface by instead calling the ei encoding and decoding functions wherever possible. Restore commented-out float tests in ei_decode_SUITE and ei_encode_SUITE in lib/erl_interface/test. Modify them to make them match the style of other tests in the same suites. These changes are based on an ei float patch from Serge Aleynikov originally submitted against R12B-2 in July 2008 and reworked by Steve Vinoski May 2010.
| * compact IEEE 754 double encoding in external binary format for eiSteve Vinoski2010-06-071-5/+5
|/ | | | | | | | | | | | | | | | | | | | | | Implement the compact IEEE 754 double encoding in external binary format for ei. Encoding for ei now always produces the NEW_FLOAT_EXT format. Decoding and term printing handle both the old ERL_FLOAT_EXT encoding and the new NEW_FLOAT_EXT encoding. Legacy erl_interface code also handles the new encoding, but still produces the ERL_FLOAT_EXT encoding by default. Also enable the DFLAG_NEW_FLOATS distribution flag. Reduce the number of copies of the code for encoding and decoding doubles throughout ei and erl_interface by instead calling the ei encoding and decoding functions wherever possible. Restore commented-out float tests in ei_decode_SUITE and ei_encode_SUITE in lib/erl_interface/test. Modify them to make them match the style of other tests in the same suites. These changes are based on an ei float patch from Serge Aleynikov originally submitted against R12B-2 in July 2008.
* The R13B03 release.OTP_R13B03Erlang/OTP2009-11-2021-0/+1257