
230 Cal.App.2d 645 (1964)
THE PEOPLE, Plaintiff and Respondent,
v.
JOE RICCO MANAGO, Defendant and Appellant.
Crim. No. 4487. 
California Court of Appeals. First Dist., Div. Three.  
Nov. 16, 1964.
 Robert H. Laws, Jr., under appointment by the District Court of Appeal, for Defendant and Appellant.
 Stanley Mosk and Thomas C. Lynch, Attorneys General, Albert W. Harris, Jr., and Edward P. O'Brien, Deputy Attorneys General, for Plaintiff and Respondent.
 DRAPER, P. J.
 This appeal turns on the multiple prosecution bar of Penal Code, section 654. "An act or omission which is made punishable in different ways by different provisions of this Code may be punished under either of such provisions, but in no case can it be punished under more than one; an acquittal or conviction and sentence under either one bars a prosecution for the same act or omission under any other."
 Defendant entered the employees' locker room of a San Francisco department store. This area was not open to the public, and defendant was not an employee. He was observed going through the pockets of garments in two lockers, and was arrested. A straight edge razor was found in his pocket. Complaints were filed charging him with burglary and with violation of a city ordinance which makes it a misdemeanor for one carrying such a weapon concealed upon his person to "hide, lurk, or loiter upon or about the premises of another." At his first trial on the felony charge the jury disagreed and was discharged June 19, 1963. That case was promptly set for retrial, but the misdemeanor complaint was refiled June 24, jury was waived, the case was tried and a judgment of conviction entered the same day. On July 2, defendant was sentenced to six months' imprisonment in county jail, and commitment issued. Retrial of the burglary charge began July 15, and the next day the jury found him guilty of burglary in the first degree. The only ground for the first degree finding is his possession of the razor. *647 Motion for new trial was denied. He was sentenced to state prison and appeals.
 The decisions concerning section 654 have dealt almost wholly with its first clause, which prohibits multiple punishment for a single act or omission, even though it be made punishable by more than one code section. [1] It seems clear, however, that the rule against multiple prosecution is at least as broad as that against double punishment (Neal v. State, 55 Cal.2d 11, 21 [9 Cal.Rptr. 607, 357 P.2d 839]; and see 10 U.C.L.A.L.Rev. 870). We look, then, to the double punishment cases for guidance (see Seiterle v. Superior Court, 57 Cal.2d 397 [20 Cal.Rptr. 1, 369 P.2d 697]).
 [2] Although section 654 ostensibly relates only to punishment or prosecution under two provisions of "this [i.e., Penal] Code," the rule also applies to an act made punishable by provisions of different codes (Neal v. State, supra, 55 Cal.2d 11, 18, fn. 1; People v. Brown, 49 Cal.2d 577, 591, fn. 4 [320 P.2d 5]; see People v. Kynette, 15 Cal.2d 731, 761-762 [104 P.2d 794]). An appellate department decision (People v. Williams, 207 Cal.App.2d Supp. 912, 919 [24 Cal.Rptr. 922]) has held that section 654 applies also to a municipal ordinance. This rule seems consistent with the intent and purpose of the section, and we adopt it.
 [3] Section 654 patently applies when there is but a single act. It also applies when a course of conduct which does not consist of divisible transactions violates more than one penal provision (Neal v. State, supra, 55 Cal.2d 11, 18). Whether a course of conduct is divisible depends upon the intent and objective of the actor, and if all the offenses were incident to but one objective, the defendant may be punished for only one (id). Thus the section proscribes punishment for burglary and for theft of goods taken as a result of the burglarious entry (People v. McFarland, 58 Cal.2d 748 [26 Cal.Rptr. 473, 376 P.2d 449]) and for burglary and the robbery which directly followed and was the intended result of the entry (In re Dowding, 188 Cal.App.2d 418, 423 [10 Cal.Rptr. 392]).
 [4] Respondent argues that defendant, carrying the razor in his pocket, entered the employees' locker room with intent to commit theft, as charged in the information, and then separately formed a new and independent intent to "hide, lurk or loiter" there, still carrying the weapon. But it is apparent that this distinction was not made in the two trials. In each, the prosecution's case was that defendant entered the *648 locker room, opened two lockers, and went through the pockets of garments hanging in them. It is clear that identical conduct was relied upon to establish the misdemeanor and the felony. The claimed change of intent is also weakened by testimony that defendant was in the locker room only "three or four minutes." Reduction of the burglary conviction to second degree might relieve defendant of the effect of carrying the razor in both offenses, but it would not meet the fact that both prosecutions were based upon the same brief course of conduct.
 The misdemeanor is not an offense necessarily included in the felony charge (see People v. Greer, 30 Cal.2d 589, 596-597 [184 P.2d 512]). Thus there is no bar of double jeopardy (Cal. Const., art. I,  13, Pen. Code,  1023). But the proscription of section 654 is distinct (People v. Tideman, 57 Cal.2d 574, 578, 584-585 [21 Cal.Rptr. 207, 370 P.2d 1007]). Conviction and sentence on the misdemeanor charge bars prosecution of the burglary charge based upon the same conduct.
 Judgment reversed.
 Salsman, J., and Devine, J., concurred.
