Index: third_party/yasm/patched-yasm/libyasm/bytecode.h |
=================================================================== |
--- third_party/yasm/patched-yasm/libyasm/bytecode.h (revision 165590) |
+++ third_party/yasm/patched-yasm/libyasm/bytecode.h (working copy) |
@@ -2,10 +2,6 @@ |
* \file libyasm/bytecode.h |
* \brief YASM bytecode interface. |
* |
- * \rcs |
- * $Id: bytecode.h 2130 2008-10-07 05:38:11Z peter $ |
- * \endrcs |
- * |
* \license |
* Copyright (C) 2001-2007 Peter Johnson |
* |
@@ -147,6 +143,8 @@ |
* passed-in buf matches the bytecode length |
* (it's okay not to do this if an error |
* indication is returned) |
+ * \param bufstart For calculating the correct offset parameter for |
+ * the \a output_value calls: *bufp - bufstart. |
* \param d data to pass to each call to |
* output_value/output_reloc |
* \param output_value function to call to convert values into their byte |
@@ -158,7 +156,8 @@ |
* preferable if calling this function twice would result in the |
* same output. |
*/ |
- int (*tobytes) (yasm_bytecode *bc, unsigned char **bufp, void *d, |
+ int (*tobytes) (yasm_bytecode *bc, unsigned char **bufp, |
+ unsigned char *bufstart, void *d, |
yasm_output_value_func output_value, |
/*@null@*/ yasm_output_reloc_func output_reloc); |
@@ -277,7 +276,7 @@ |
*/ |
YASM_LIB_DECL |
int yasm_bc_tobytes_common |
- (yasm_bytecode *bc, unsigned char **bufp, void *d, |
+ (yasm_bytecode *bc, unsigned char **bufp, unsigned char *bufstart, void *d, |
yasm_output_value_func output_value, |
/*@null@*/ yasm_output_reloc_func output_reloc); |
@@ -575,6 +574,12 @@ |
(unsigned long)(l)) |
#endif |
+/** Get the underlying value of a data value. |
+ * \param dv data value |
+ * \return Value, or null if non-value (e.g. string or raw). |
+ */ |
+yasm_value *yasm_dv_get_value(yasm_dataval *dv); |
+ |
/** Set multiple field of a data value. |
* A data value can be repeated a number of times when output. This function |
* sets that multiple. |