Hi everyone,<br><br> Can I take the tools plugins like it is and run selftest. How is it are yall working for 0.16.0<br> Plugins. <br><br> Bubba<br><br><br><div><span class="gmail_quote">On 3/15/07,
<b class="gmail_sendername">Alexander Belchenko</b> <<a href="mailto:bialix@ukr.net">bialix@ukr.net</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
-----BEGIN PGP SIGNED MESSAGE-----<br>Hash: SHA1<br><br>John Arbash Meinel пишет:<br>> Alexander Belchenko wrote:<br>>> John Arbash Meinel ?8H5B:<br>><br>>>>> + class _ctypes_FileLock(_base_Lock):
<br>>>>> +<br>>>>> + def _lock(self, filename, openmode, lockmode):<br>>>>> + self._open(filename, openmode)<br>>>>> +<br>>>>> + self.hfile
= msvcrt.get_osfhandle(self.f.fileno())<br>>>>> + overlapped = OVERLAPPED()<br>>>>> + p_overlapped = ctypes.pointer(overlapped)<br>>> ^-- In my own programs I use ctypes.byref
() function to pass pointer to some<br>>> struct in C-function as argument. I'm okay with your implementation though.<br>><br>> Either way. I was looking for a way to get a pointer, and this is what I<br>> found in cytypes.
<br>><br>> Your idea is<br>><br>> result = _LockFileEx(self.hfile,<br>> lockmode,<br>> 0,<br>> 0x7fffffff,<br>> 0x00000000,
<br>> overlapped.byref(),<br>> )<br>><br>> Is that correct?<br><br>No, ctypes-object does not have .byref method.<br>It should be actually: ctypes.byref(overlapped).<br>
<br>> I actually submitted this, because I thought you approved from my add-on<br>> patch.<br><br>Sorry for this. I vote on your second patch earlier and want to study big one as well,<br>but don't have the time to carefully read your big patch during this day.
<br>I hope I help (a little).<br><br>> But I'm happy to do your cleanups and submit them.<br>><br>> By the way, Alexander, my branch at:<br>><br>> <a href="http://bzr.arbash-meinel.com/branches/bzr/0.15-dev/locking">
http://bzr.arbash-meinel.com/branches/bzr/0.15-dev/locking</a><br>><br>> now has proper support for updating the dirstate during 'bzr status'.<br><br>Great, thanks.<br><br>><br>> It also has updated fcntl locks, so it exposes the same bugs in our
<br>> code. (Places where we are opening the same tree 2 times, and expecting<br>> to be able to take a read and write lock at the same time).<br>><br>> You may want to give it a look.<br><br>Definitely.<br><br>
[µ]<br>-----BEGIN PGP SIGNATURE-----<br>Version: GnuPG v1.4.6 (MingW32)<br>Comment: Using GnuPG with Mozilla - <a href="http://enigmail.mozdev.org">http://enigmail.mozdev.org</a><br><br>iD8DBQFF+ZdmzYr338mxwCURArCgAJ9wWrFpmDe3CQJlVUPdKa6FFiFMWgCfePHN
<br>1CuEFxk7aTfwg8a5HQR0Ri4=<br>=q8hD<br>-----END PGP SIGNATURE-----<br><br></blockquote></div><br><br clear="all"><br>-- <br>-----BEGIN PGP SIGNATURE-----<br>Version: GnuPG v1.4.3 (GNU/Linux)<br><br>iD8DBQFFkcN7yXWcajQQndYRAgbqAKCMyXN9Jx4g0X7jocg+aUSFz0x4LwCgrURW
<br>eGtqLjpzQVYa9+gzpCRtB84=<br>=zrpM<br>-----END PGP SIGNATURE-----