aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface/doc/src
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2013-02-07 14:46:19 +0100
committerSverker Eriksson <[email protected]>2013-02-07 14:46:19 +0100
commitb0693061137de237c38965c556c7d6ded8977394 (patch)
tree18bb5289d54c522fd39d5893d48a4783b4909a54 /lib/erl_interface/doc/src
parent68b804f34d4ec420d86953e3f519179a40fbee8f (diff)
downloadotp-b0693061137de237c38965c556c7d6ded8977394.tar.gz
otp-b0693061137de237c38965c556c7d6ded8977394.tar.bz2
otp-b0693061137de237c38965c556c7d6ded8977394.zip
erl_interface: Change enum erlang_char_encoding to a typedef
to make the API independent of the actual type of erlang_char_encoding
Diffstat (limited to 'lib/erl_interface/doc/src')
-rw-r--r--lib/erl_interface/doc/src/ei.xml25
1 files changed, 14 insertions, 11 deletions
diff --git a/lib/erl_interface/doc/src/ei.xml b/lib/erl_interface/doc/src/ei.xml
index 03eea49224..dfe181bd1d 100644
--- a/lib/erl_interface/doc/src/ei.xml
+++ b/lib/erl_interface/doc/src/ei.xml
@@ -86,18 +86,21 @@
<title>DATA TYPES</title>
<taglist>
- <tag><marker id="erlang_char_encoding"/>enum erlang_char_encoding</tag>
+ <tag><marker id="erlang_char_encoding"/>erlang_char_encoding</tag>
<item>
<p/>
<code type="none">
-enum erlang_char_encoding {
- ERLANG_ASCII, ERLANG_LATIN1, ERLANG_UTF8
-};
+typedef enum {
+ ERLANG_ASCII = 1,
+ ERLANG_LATIN1 = 2,
+ ERLANG_UTF8 = 4
+}erlang_char_encoding;
</code>
- <p>The character encoding used for atoms. <c>ERLANG_ASCII</c> represents 7-bit ASCII.
+ <p>The character encodings used for atoms. <c>ERLANG_ASCII</c> represents 7-bit ASCII.
Latin1 and UTF8 are different extensions of 7-bit ASCII. All 7-bit ASCII characters
are valid Latin1 and UTF8 characters. ASCII and Latin1 both represent each character
- by one byte. A UTF8 character can consist of one to four bytes.</p>
+ by one byte. A UTF8 character can consist of one to four bytes. Note that these
+ constants are bit-flags and can be combined with bitwise-or.</p>
</item>
</taglist>
</section>
@@ -250,10 +253,10 @@ enum erlang_char_encoding {
</desc>
</func>
<func>
- <name><ret>int</ret><nametext>ei_encode_atom_as(char *buf, int *index, const char *p, enum erlang_char_encoding from_enc, enum erlang_char_encoding to_enc)</nametext></name>
- <name><ret>int</ret><nametext>ei_encode_atom_len_as(char *buf, int *index, const char *p, int len, enum erlang_char_encoding from_enc, enum erlang_char_encoding to_enc)</nametext></name>
- <name><ret>int</ret><nametext>ei_x_encode_atom_as(ei_x_buff* x, const char *p, enum erlang_char_encoding from_enc, enum erlang_char_encoding to_enc)</nametext></name>
- <name><ret>int</ret><nametext>ei_x_encode_atom_len_as(ei_x_buff* x, const char *p, int len, enum erlang_char_encoding from_enc, enum erlang_char_encoding to_enc)</nametext></name>
+ <name><ret>int</ret><nametext>ei_encode_atom_as(char *buf, int *index, const char *p, erlang_char_encoding from_enc, erlang_char_encoding to_enc)</nametext></name>
+ <name><ret>int</ret><nametext>ei_encode_atom_len_as(char *buf, int *index, const char *p, int len, erlang_char_encoding from_enc, erlang_char_encoding to_enc)</nametext></name>
+ <name><ret>int</ret><nametext>ei_x_encode_atom_as(ei_x_buff* x, const char *p, erlang_char_encoding from_enc, erlang_char_encoding to_enc)</nametext></name>
+ <name><ret>int</ret><nametext>ei_x_encode_atom_len_as(ei_x_buff* x, const char *p, int len, erlang_char_encoding from_enc, erlang_char_encoding to_enc)</nametext></name>
<fsummary>Encode an atom</fsummary>
<desc>
<p>Encodes an atom in the binary format with character encoding
@@ -534,7 +537,7 @@ ei_x_encode_empty_list(&amp;x);
</desc>
</func>
<func>
- <name><ret>int</ret><nametext>ei_decode_atom_as(const char *buf, int *index, char *p, int plen, enum erlang_char_encoding want, enum erlang_char_encoding* was, enum erlang_char_encoding* result)</nametext></name>
+ <name><ret>int</ret><nametext>ei_decode_atom_as(const char *buf, int *index, char *p, int plen, erlang_char_encoding want, erlang_char_encoding* was, erlang_char_encoding* result)</nametext></name>
<fsummary>Decode an atom</fsummary>
<desc>
<p>This function decodes an atom from the binary format. The