]> granicus.if.org Git - python/commitdiff
No longer need to use codehack -- use co.co_firstlineno instead.
authorGuido van Rossum <guido@python.org>
Fri, 18 Jul 1997 16:47:40 +0000 (16:47 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 18 Jul 1997 16:47:40 +0000 (16:47 +0000)
Lib/pdb.py

index ec6a2abf432e7be9bd5acced966b361597d229d0..99e619146c754815eb26586223348dc6072158a6 100755 (executable)
@@ -112,7 +112,6 @@ class Pdb(bdb.Bdb, cmd.Cmd):
                        filename = self.curframe.f_code.co_filename
                except:
                        # Try function name as the argument
-                       import codehack
                        try:
                                func = arg
                                if hasattr(func, 'im_func'):
@@ -122,7 +121,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
                                print '*** The specified object',
                                print 'is not a function', arg
                                return
-                       lineno = codehack.getlineno(code)
+                       lineno = code.co_firstlineno
                        filename = code.co_filename
 
                # now set the break point