Add tags

Add tags to the following comment

ちょっと簡略化。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
--- clipboard.py    Mon Feb 11 19:47:02 2008
+++ clipboard.py    Mon Jul  7 02:51:50 2008
@@ -37,9 +37,7 @@
         raise WindowsError("GlobalAlloc() failed")
     try:
         with _GlobalLock(h) as p:
-            p = (ctypes.c_char * (len(s) + 1)).from_address(p)
-            for i, c in enumerate(s + "\0"):
-                p[i] = c
+            (ctypes.c_char * (len(s) + 1)).from_address(p).value = s
         # clipboard
         with _Clipboard():
             user32.EmptyClipboard()

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...