This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [python][patch] Add options length parameter tovalue.string(...)


El jue, 09-04-2009 a las 17:12 +0100, Phil Muldoon escribiÃ:
> I think I have implemented all of your requested changes.

I looked at the patch and it seems good. I have just a few nits, I hope
you will put up with me just a tad bit more. :-)

>  static PyObject *
>  valpy_string (PyObject *self, PyObject *args, PyObject *kw)
>  {

This function has the following comment above it:

/* Implementation of gdb.Value.string ([encoding] [, errors]) -> string
   Return Unicode string with value contents.  If ENCODING is not given,
   the string is assumed to be encoded in the target's charset.  */

Would you mind adding "[, length] to the prototype?

> +  gdb_test "python print st.string (length = 0)" "" "Test string (length = 0) is empty"

Does using "" as test pattern really test for an empty line? I know that
gdb_test puts an EOL marker right after the pattern, but it doesn't put
any required pattern before the pattern...
-- 
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]