From: David Malcolm Date: Tue, 27 Jan 2015 00:11:21 +0000 (+0000) Subject: Fix gcc_jit_context_get_last_error docs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dc44ee3aef6fab2e760479c6fc9205838bd9fbcc;p=gcc.git Fix gcc_jit_context_get_last_error docs gcc/jit/ChangeLog: * docs/topics/compilation.rst (gcc_jit_result_get_code): Fix typo. * docs/topics/contexts.rst (gcc_jit_context_get_last_error): The error buffer is only valid until the next call to the context. * libgccjit.h (gcc_jit_context_get_first_error): Reword the comment to omit mention of compiling. (gcc_jit_context_get_last_error): The error buffer is only valid until the next call to the context. From-SVN: r220145 --- diff --git a/gcc/jit/ChangeLog b/gcc/jit/ChangeLog index 3561ac81d26..577712cc6bc 100644 --- a/gcc/jit/ChangeLog +++ b/gcc/jit/ChangeLog @@ -1,3 +1,14 @@ +2015-01-26 David Malcolm + + * docs/topics/compilation.rst (gcc_jit_result_get_code): Fix typo. + * docs/topics/contexts.rst (gcc_jit_context_get_last_error): The + error buffer is only valid until the next call to the context. + * docs/_build/texinfo/libgccjit.texi: Regenerate. + * libgccjit.h (gcc_jit_context_get_first_error): Reword the + comment to omit mention of compiling. + (gcc_jit_context_get_last_error): The error buffer is only valid + until the next call to the context. + 2015-01-26 David Malcolm PR jit/64708 diff --git a/gcc/jit/docs/_build/texinfo/libgccjit.texi b/gcc/jit/docs/_build/texinfo/libgccjit.texi index 83710ff159d..3c324996052 100644 --- a/gcc/jit/docs/_build/texinfo/libgccjit.texi +++ b/gcc/jit/docs/_build/texinfo/libgccjit.texi @@ -19,7 +19,7 @@ @copying @quotation -libgccjit 5.0.0 (experimental 20150120), January 19, 2015 +libgccjit 5.0.0 (experimental 20150126), January 26, 2015 David Malcolm @@ -5049,10 +5049,10 @@ occurred on the context, so that you can embed this in an exception: Returns the last error message that occurred on the context. -The returned string is valid for the rest of the lifetime of the -context. - If no errors occurred, this will be NULL. + +If non-NULL, the returned string is only guaranteed to be valid until +the next call to libgccjit relating to this context. @end deffn @node Debugging,Options<2>,Error-handling<2>,Compilation contexts @@ -7509,7 +7509,7 @@ with it. A @cite{gcc_jit_result} encapsulates the result of compiling a context in-memory, and the lifetimes of any machine code functions or globals -that are within the resuilt. +that are within the result. @end deffn @geindex gcc_jit_result_get_code (C function) diff --git a/gcc/jit/docs/topics/compilation.rst b/gcc/jit/docs/topics/compilation.rst index bf59cc25a93..708d0094c28 100644 --- a/gcc/jit/docs/topics/compilation.rst +++ b/gcc/jit/docs/topics/compilation.rst @@ -45,7 +45,7 @@ In-memory compilation A `gcc_jit_result` encapsulates the result of compiling a context in-memory, and the lifetimes of any machine code functions or globals - that are within the resuilt. + that are within the result. .. function:: void *\ gcc_jit_result_get_code (gcc_jit_result *result,\ diff --git a/gcc/jit/docs/topics/contexts.rst b/gcc/jit/docs/topics/contexts.rst index 0d81f1ebd6f..cc5207770f1 100644 --- a/gcc/jit/docs/topics/contexts.rst +++ b/gcc/jit/docs/topics/contexts.rst @@ -146,11 +146,11 @@ occurred on the context, so that you can embed this in an exception: Returns the last error message that occurred on the context. - The returned string is valid for the rest of the lifetime of the - context. - If no errors occurred, this will be NULL. + If non-NULL, the returned string is only guaranteed to be valid until + the next call to libgccjit relating to this context. + Debugging --------- diff --git a/gcc/jit/libgccjit.h b/gcc/jit/libgccjit.h index 12514bab3e4..8f4354eeeb5 100644 --- a/gcc/jit/libgccjit.h +++ b/gcc/jit/libgccjit.h @@ -305,7 +305,7 @@ gcc_jit_context_set_logfile (gcc_jit_context *ctxt, int flags, int verbosity); -/* To be called after a compile, this gives the first error message +/* To be called after any API call, this gives the first error message that occurred on the context. The returned string is valid for the rest of the lifetime of the @@ -315,13 +315,13 @@ gcc_jit_context_set_logfile (gcc_jit_context *ctxt, extern const char * gcc_jit_context_get_first_error (gcc_jit_context *ctxt); -/* To be called after a compile, this gives the last error message +/* To be called after any API call, this gives the last error message that occurred on the context. - The returned string is valid for the rest of the lifetime of the - context. + If no errors occurred, this will be NULL. - If no errors occurred, this will be NULL. */ + If non-NULL, the returned string is only guaranteed to be valid until + the next call to libgccjit relating to this context. */ extern const char * gcc_jit_context_get_last_error (gcc_jit_context *ctxt);